package core.september.cloudbadge.vcard.badgemodel.fields;

import ezvcard.VCard;
import ezvcard.types.KindType;

public abstract class AbsField {
	private boolean editable = true;
	private VCard vcard;

	public boolean isEditable() {
		return editable;
	}

	public void setEditable(boolean editable) {
		this.editable = editable;
	}

	public VCard getVcard() {
		if(vcard == null) {
			vcard.setKind(KindType.individual());
			vcard.addLanguage("en-US");
			setVcard(new VCard());
			
		}
		return vcard;
	}

	public void setVcard(VCard vcard) {
		this.vcard = vcard;
	}
	
	public abstract void commit();
	
	
}
